using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Specialized;

namespace Impact.Views
{
    /// <summary>
    /// interface for a handler presenting content to a view
    /// </summary>
    public interface IContentHandler
    {

        /// <summary>
        /// the url that is requesting the content
        /// </summary>
        Uri RequestUrl
        {
            get;
        }

        /// <summary>
        /// the QueryString passed in on the request
        /// </summary>
        NameValueCollection QueryString
        {
            get;
        }

        /// <summary>
        /// Gets the address of the user requesting the content
        /// </summary>
        string UserHostAddress
        {
            get;
        }

        /// <summary>
        /// converts a string encoded for a URL to a regular string
        /// </summary>
        string DecodeUrl(string url);

        /// <summary>
        /// redirects the request to a new location
        /// </summary>
        void Redirect(string url);

        /// <summary>
        /// render the content asked for by this request
        /// </summary>
        void RenderRequest();
    }
}
